package com.xiaobao.mapper;

import com.xiaobao.pojo.TodayPlan;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Options;

// TodayPlanMapper 接口
@Mapper
public interface TodayPlanMapper {
    // 根据用户ID和日期获取当天计划
    TodayPlan[] getTodayPlan(String userid, String time);

    // 添加当天计划// 删除跟新时清除缓存
    @Options(flushCache = Options.FlushCachePolicy.TRUE)
    boolean addTodayPlan(TodayPlan todayPlan);

    //  更新当天计划// 删除跟新时清除缓存
    @Options(flushCache = Options.FlushCachePolicy.TRUE)
    boolean updateTodayPlan(TodayPlan todayPlan);

    //  删除当天计划// 删除跟新时清除缓存
    @Options(flushCache = Options.FlushCachePolicy.TRUE)
    boolean deleteTodayPlan(TodayPlan todayPlan);
}
